import React, { FC } from "react";
// import "./List.css";
import QuestionCard from "../Question/QuestionCard";

const List1: FC = () => {
  // 列表页
  // 问卷数据
  const questionList = [
    { id: "q1", title: "问题1", isPubilshed: true },
    { id: "q2", title: "问题1", isPubilshed: false },
    { id: "q3", title: "问题1", isPubilshed: true },
    { id: "q4", title: "问题1", isPubilshed: false },
  ];

  return (
    <div>
      <h1>问卷列表1</h1>
      <div>
        {questionList.map((question) => {
          const { id, title, isPubilshed } = question;
          return (
            <QuestionCard
              key={id}
              id={id}
              title={title}
              isPublished={isPubilshed}
            />
          );
        })}
      </div>
    </div>
  );
};

export default List1;
